home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADDI.IN_ / oemnaddi.inf
INI File  |  1996-07-12  |  44KB  |  1,049 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     MCA
  7.     "Jazz-Internal Bus"
  8. [LanguagesSupported]
  9.     ENG
  10. [Options]
  11.     DATAFIREU
  12.     DATAFIREST
  13.     DATAFIRE4ST
  14.     PCIMACISA
  15.     PCIMAC4
  16. [OptionsMCA]
  17.     PCIMACMC
  18. [AdapterInfoMCA]
  19.     PCIMACMC        =  {32670},         {158},      {127}
  20. [FileConstants]
  21. UtilityInf      = "UTILITY.INF"
  22. ParamInf        = "NCPARAM.INF"
  23. subroutineinf   = "SUBROUTN.INF"
  24. InfFileName     = "OEMNADDI.INF"
  25. SoftwareType    = "driver"
  26. Exit_Code       = 0
  27. DIGIHANDLE = 0
  28. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  29. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  30. Manufacturer    = "DigiBoard"
  31. ProductMajorVersion     = "4"
  32. ProductMinorVersion     = "0"
  33. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  34. ProductSoftwareName     = "Pcimac"
  35. ProductSoftwareTitle    = "Digi ISDN Adapter Driver"
  36. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\pcimac.sys"
  37. NetRuleSoftwareType     = "pcimacSys ndisDriver pcimacDriver"
  38. NetRuleSoftwareUse      = $(SoftwareType)
  39. NetRuleSoftwareBindForm = """PcimacSys"" yes no container"
  40. NetRuleSoftwareClass    = {"pcimacDriver basic"}
  41. NetRuleSoftwareBindable = {"pcimacDriver pcimacAdapter non exclusive 100"}
  42. ProductHardwareName     = "Pcimac"
  43. ProductHardwareTitle    = "Digi ISDN Adapter"
  44. NetRuleHardwareType     = "pcimac pcimacAdapter"
  45. NetRuleHardwareBindForm = " yes yes container"
  46. NetRuleHardwareClass    = {"pcimacAdapter basic"}
  47. ProductOpSupport     = 134 
  48. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  49. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  50. AdapterList = ^(AdapterInfo$(BusType),0)
  51. AdapterHardwareAdapterIDList = ^(AdapterInfo$(BusType), 1)
  52. AdapterIDByte1List = ^(AdapterInfo$(BusType), 2)
  53. AdapterIDByte2List = ^(AdapterInfo$(BusType), 3)
  54. AdapterHardwareAdapterID = *($(AdapterHardwareAdapterIDList), ~($(AdapterList), $(Option)))
  55. AdapterIDByte1 = *($(AdapterIDByte1List), ~($(AdapterList), $(Option)))
  56. AdapterIDByte2 = *($(AdapterIDByte2List), ~($(AdapterList), $(Option)))
  57. AdapterHardwareName = pcimac
  58. [GeneralConstants]
  59. from      = ""
  60. to        = ""
  61. ExitCodeOk     = 0
  62. ExitCodeCancel = 1
  63. ExitCodeFatal  = 2
  64. KeyNull         = ""
  65. !MAXIMUM_ALLOWED   = 33554432
  66. RegistryErrorIndex = NO_ERROR
  67. KeyProduct      = ""
  68. KeyParameters   = ""
  69. TRUE            = 1
  70. FALSE           = 0
  71. NoTitle            = 0
  72. ExitState   = "Active"
  73. OldVersionExisted = $(FALSE)
  74. DriverPath      = $(!STF_NTPATH)\drivers
  75. CopyFirmwareOnly = $(TRUE)
  76. [date]
  77.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  78. [Identify]
  79.     read-syms Identification
  80.     set Status     = STATUS_SUCCESSFUL
  81.     set Identifier = $(OptionType)
  82.     set Media      = #("Source Media Descriptions", 1, 1)
  83.     Return $(Status) $(Identifier) $(Media)
  84. [ReturnOptions]
  85.     read-syms GeneralConstants
  86.     Debug-Output "****    OEMNADDI: Entering ReturnOptions   ****"
  87.     Debug-Output "NTN_InstallMode = "$(!NTN_InstallMode)
  88.     set Status        = STATUS_FAILED
  89.     set OptionList     = {}
  90.     set OptionTextList = {}
  91.     set LanguageList = ^(LanguagesSupported, 1)
  92.     Ifcontains(i) $($0) in $(LanguageList)
  93.     ifstr(i) $($1) == ""
  94.         goto returnoptions
  95.     endif
  96.     set PlatformList = ^(PlatformsSupported, 1)
  97.     Ifcontains(i) $($1) in $(PlatformList)
  98.         goto returnoptions
  99.     else
  100.         set Status = STATUS_NOTSUPPORTED
  101.         goto finish_ReturnOptions
  102.     endif
  103.     else
  104.     set Status = STATUS_NOLANGUAGE
  105.     goto finish_ReturnOptions
  106.     endif
  107. returnoptions = +
  108.     ifstr(i) $($1) == "MCA"
  109.     set OptionList     = ^(OptionsMCA, 1)
  110.     set OptionTextList = ^(OptionsTextMCA$($0), 1)
  111.     set Status         = STATUS_SUCCESSFUL
  112.     Debug-Output "returning: OptionList = "$(OptionList)
  113.     Debug-Output "           OptionTextList = "$(OptionTextList)
  114.     else
  115.     set OptionList     = ^(Options, 1)
  116.     set OptionTextList = ^(OptionsText$($0), 1)
  117.     set Status         = STATUS_SUCCESSFUL
  118.     Debug-Output "returning: OptionList = "$(OptionList)
  119.     Debug-Output "           OptionTextList = "$(OptionTextList)
  120.     endif
  121. finish_ReturnOptions = +
  122.     Return $(Status) $(OptionList) $(OptionTextList)
  123. [InstallOption]
  124.     set Status   = STATUS_FAILED
  125.     set Option   = $($1)
  126.     set SrcDir   = $($2)
  127.     set AddCopy  = $($3)
  128.     set DoCopy   = $($4)
  129.     set DoConfig = $($5)
  130.     set LanguageList = ^(LanguagesSupported, 1)
  131.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  132.     Return STATUS_NOLANGUAGE
  133.     endif
  134.     ifstr(i) $(!STF_BUSTYPE) == "MCA"
  135.     set BusType = "MCA"
  136.     else
  137.     set BusType = ""
  138.     endif
  139.     set-subst LF = "\n"
  140.     read-syms GeneralConstants
  141.     read-syms FileConstants
  142.     ifstr(i) $(!NTN_Origination) == "NCPA"
  143.     set Continue = "OK"
  144.     endif
  145.     read-syms FileConstants$(!STF_LANGUAGE)
  146.     detect date
  147.     set-title  $(FunctionTitle)
  148.     set to   = Begin
  149.     set from = Begin
  150.     set CommonStatus = STATUS_SUCCESSFUL
  151.     EndWait
  152.     Debug-Output "OEMNADDI.INF: [InstallOption]"
  153.     Debug-Output "                  Option = "$(Option)
  154.     Debug-Output "                  SrcDir = "$(SrcDir)
  155.     Debug-Output "                  AddCopy = "$(AddCopy)
  156.     Debug-Output "                  DoCopy = "$(DoCopy)
  157.     Debug-Output "                  DoConfig = "$(DoConfig)
  158. Begin = +
  159.     set Result = {}
  160.     Set ActivateDetection = FALSE
  161.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  162.         set StartLabel = removeadapter
  163.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  164.         set StartLabel = UpgradeSoftware
  165.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  166.         set StartLabel = bindingadapter
  167.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  168.         set StartLabel = configureadapter
  169.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  170.             Debug-Output "Cannot configure the PCIMAC driver software."
  171.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  172.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  173.             Debug-Output "ShellCode error: cannot get an error string."
  174.             goto ShellCodeError
  175.             endif
  176.             set Error = $($R0)
  177.             set from = end
  178.             set to = end
  179.             goto nonfatalinfo
  180.         endif
  181.     else
  182.         ifstr(i) $(!STF_NCDETINFO) == {}
  183.             Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardwarePCIMACDescription) $(BusInterfaceType) $(BusNumber)
  184.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  185.             Debug-Output "ShellCode error."
  186.             goto ShellCodeError
  187.             endif
  188.             ifstr(i) $($R0) != NO_ERROR
  189.             set Error = $($R0)
  190.             set from = end
  191.             set to = end
  192.             goto cancel
  193.             else-ifstr(i) $($R3) == CANCEL
  194.             set Error = $($R0)
  195.             set from = end
  196.             set to = end
  197.             goto cancel
  198.             endif
  199.             set BusTypeNum = $($R1)
  200.         else-ifstr(i) $(!STF_NCDETINFO) == ""
  201.             Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardwarePCIMACDescription) $(BusInterfaceType) $(BusNumber)
  202.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  203.             Debug-Output "ShellCode error."
  204.             goto ShellCodeError
  205.             endif
  206.             ifstr(i) $($R0) != NO_ERROR
  207.             set Error = $($R0)
  208.             set from = end
  209.             set to = end
  210.             goto cancel
  211.             else-ifstr(i) $($R3) == CANCEL
  212.             set Error = $($R0)
  213.             set from = end
  214.             set to = end
  215.             goto cancel
  216.             endif
  217.             set BusTypeNum = $($R1)
  218.         else
  219.             set BusTypeNum = *($(!STF_NCDETINFO),5)
  220.         endif
  221.         set ActivateDetection = TRUE
  222.         set StartLabel = installadapter
  223.         set OEM_ABANDON_OPTIONS = {}
  224.         set OEM_ABANDON_SOFTWARE = FALSE
  225.         set OEM_ABANDON_ON = TRUE
  226.     endif
  227.     Debug-Output "OEMNADDI.INF: =================================================="
  228.     Debug-Output "OEMNADDI.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  229.     Debug-Output "OEMNADDI.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  230.     Debug-Output "OEMNADDI.INF: Option is: "$(Option)
  231.     Debug-Output "OEMNADDI.INF: SrcDir is: "$(SrcDir)
  232.     Debug-Output "OEMNADDI.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  233.     Debug-Output "OEMNADDI.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  234.     Debug-Output "OEMNADDI.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  235.     Debug-Output "OEMNADDI.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  236.     Debug-Output "OEMNADDI.INF: =================================================="
  237.     Set DetectedCard = FALSE
  238.     Ifstr(i) $(ActivateDetection) != TRUE
  239.         Goto $(StartLabel)
  240.     Endif
  241. installadapter = +
  242.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  243.     Debug-Output "OEMNADDI.INF: KeyProduct "$(KeyProduct)
  244.     Ifstr $(KeyProduct) != $(KeyNull)
  245.         CloseRegKey $(KeyProduct)
  246.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  247.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  248.                $(ProductVersion)
  249.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  250.                Debug-Output "ShellCode error: cannot get an error string."
  251.                goto ShellCodeError
  252.            endif
  253.            goto end
  254.         else
  255.            set NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  256.            OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardKeyName) $(!MAXIMUM_ALLOWED) IE_KeyNetcards
  257.            ifstr(i) $(IE_KeyNetcards) != ""
  258.                EnumRegKey $(IE_KeyNetcards) IE_KeyNameList
  259.                ForListDo $(IE_KeyNameList)
  260.                    OpenRegKey $(IE_KeyNetcards) "" *($($),1) +
  261.                      $(!MAXIMUM_ALLOWED) NetworkCardKey
  262.                    Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  263.                        GetRegValue $(NetworkCardKey),"Manufacturer", ManufacturerInfo
  264.                        set ManufacturerName = *($(ManufacturerInfo), 4)
  265.                        Debug-Output "   Manufacturer = "$(ManufacturerName)
  266.                        Ifstr $(ManufacturerName) != $(Manufacturer)
  267.                            goto nextnetcard2
  268.                        endif
  269.                        GetRegValue $(NetworkCardKey),"ProductName", ProductNameInfo
  270.                        set ProductName = *($(ProductNameInfo), 4)
  271.                        Debug-Output "   ProductName = "$(ProductName)
  272.                        Ifstr(i) $(ProductName) != "PCIMAC"
  273.                            goto nextnetcard2
  274.                        endif
  275.                        OpenRegKey $(NetworkCardKey) "" "NetRules" +
  276.                            $(!MAXIMUM_ALLOWED) NetRuleKey
  277.                        Ifstr $(NetRuleKey) != $(KeyNull)
  278.                            GetRegValue $(NetRuleKey),"InfOption", InfOptionInfo
  279.                            set InfOption = *($(InfOptionInfo), 4)
  280.                            Debug-Output "InfOption = "$(InfOption)
  281.                        endif
  282.                        Ifstr(i) $(InfOption) == $(Option)
  283.                            set CopyFirmwareOnly = $(FALSE)
  284.                        endif
  285.                        CloseRegKey $(NetRules)
  286.                        CloseRegKey $(NetworkCardKey)
  287.                    endif
  288. nextnetcard2 = +
  289.                EndForListDo
  290.                CloseRegKey $(IE_KeyNetcards)
  291.            endif
  292.            ifint $(CopyFirmwareOnly) == $(FALSE)
  293.                Shell $(UtilityInf), CardExistedDlg
  294.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  295.                    Debug-Output "ShellCode error: cannot get an error string."
  296.                    goto ShellCodeError
  297.                endif
  298.                ifstr(i) $($R1) != "OK"
  299.                    goto end
  300.                endif
  301.                set OldVersionExisted = $(TRUE)
  302.             endif
  303.         endif
  304.     else
  305.         set CopyFirmwareOnly = $(FALSE)
  306.     endif
  307.     goto adapteroptions
  308. configureadapter = +
  309.     Debug-Output "OEMNADDI.INF: Configure Adapter "$(!NTN_RegBase)
  310.     Debug-Output "              !REG_H_LOCAL = "$(!REG_H_LOCAL)
  311.     shell "" QueryParameters $(!NTN_RegBase)
  312.     set BusTypeNum = $($R1)
  313.     Debug-Output "OEMNADDI.INF: (Config) BusTypeNum is: "$(BusTypeNum)
  314. adapteroptions = +
  315.     StartWait
  316.     ifint $(OldVersionExisted) == $(FALSE)
  317.         ifstr(i) $(!NTN_InstallMode) == "install"
  318.            Ifstr(i) $(DoCopy) == "YES"
  319.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  320.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  321.                   Goto ShellCodeError
  322.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  323.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  324.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  325.                       goto ShellCodeError
  326.                   endif
  327.                   set Error = $($R0)
  328.                   Goto fatal
  329.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  330.                   Goto successful
  331.               Endif
  332.               Set SrcDir = $($R1)
  333.               Split-String $(SrcDir) "\" JunkList
  334.               QueryListSize JunkSize $(JunkList)
  335.               Set JunkItem = *($(JunkList),$(JunkSize))
  336.               set JunkItem2 = "foo"
  337.               ifstr $(JunkItem2)$(JunkItem)$(JunkItem2) != $(JunkItem2)"\"$(JunkItem2)
  338.                   Debug-Output "In ifstr"
  339.                   set SrcDir = $(SrcDir)"\"
  340.               endif
  341.               Debug-Output "Reassigning SourceDirectory = "$(SrcDir)
  342.            Endif
  343.            install "Install-Option"
  344.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  345.                   goto filecopycancel
  346.            endif
  347.         endif
  348.     endif
  349.     Debug-Output "OEMNADDI.INF: RegBase "$(!NTN_RegBase)
  350.     LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
  351.     Debug-Output "OEMNADDI.INF: LIBHANDLE is "$(!LIBHANDLE)
  352.     LoadLibrary "x" $(!STF_CWDDIR)digiinst.dll DIGIHANDLE
  353.     Debug-Output "OEMNADDI.INF: DIGIHANDLE is "$(DIGIHANDLE)
  354.     Shell "subroutn.inf" PopBillboard
  355.     set AlternateMemory = ""
  356.     set AlternateIO = ""
  357.     set AlternateIRQ = ""
  358.     ifstr(i) $(BusType) == "MCA"
  359.         Ifstr(i) $(!NTN_InstallMode) == deinstall
  360.             goto getcurrentconfig
  361.         else-Ifstr(i) $(!NTN_InstallMode) == Update
  362.             goto getcurrentconfig
  363.         else-Ifstr(i) $(!NTN_InstallMode) == bind
  364.             goto getcurrentconfig
  365.         else-Ifstr(i) $(!NTN_InstallMode) == configure
  366. getcurrentconfig = +
  367.             Ifstr $(!NTN_RegBase) != $(KeyNull)
  368.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(!MAXIMUM_ALLOWED) SoftwareKey
  369.                 Ifstr $(SoftwareKey) == $(KeyNull)
  370.                     Debug-Output "Unable to open "$(!NTN_RegBase)" key!!!!"
  371.                     goto cancel
  372.                 Else
  373.                     GetRegValue $(SoftwareKey), "ServiceName", ServiceNameList
  374.                     set AdapterServiceName = *($(ServiceNameList),4)
  375.                     set AdapterName = $(AdapterServiceName)
  376.                     CloseRegKey $(SoftwareKey)
  377.                 Endif
  378.             Endif
  379.             OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(AdapterServiceName) $(!MAXIMUM_ALLOWED) BaseKey
  380.             Ifstr $(BaseKey) == $(KeyNull)
  381.                 Debug-Output "Error opening BaseKey "$(!NTN_ServiceBase)"\"$(AdapterServiceName)
  382.                 CloseRegKey $(BaseKey)
  383.                 goto fatalregistry
  384.             Endif
  385.             OpenRegKey $(BaseKey) "" "Parameters" $(!MAXIMUM_ALLOWED) ParametersKey
  386.             Ifstr $(ParametersKey) == $(KeyNull)
  387.                 goto cancel
  388.             endif
  389.             Debug-Output "Reading Parameters Key for current configuration"
  390.             GetRegValue $(ParametersKey) "IOBaseAddress" IOBaseValueList
  391.             set AlternateIO = {Slot*($(IOBaseValueList),4)}
  392.             set AlternateMemory = {Slot*($(IOBaseValueList),4)}
  393.             set AlternateIRQ = {Slot*($(IOBaseValueList),4)}
  394.         else
  395.             ForListDo $(AdapterHardwareAdapterID)
  396.                 Debug-Output "Calling MCAFindBus, "*($(AdapterIDByte1),$(#))", "*($(AdapterIDByte2),$(#))
  397.                 Shell $(UtilityInf), MCAFindBus, *($(AdapterIDByte1),$(#)), *($(AdapterIDByte2),$(#))
  398.                 Debug-Output "MCAFindBus returned "$($R1)
  399.                 set CardInfo = {}
  400.                 ifstr(i) $($R1) != {}
  401.                     set CardInfo = $($R1)
  402.                     Debug-Output "MCA controller found!"
  403.                     Debug-Output "CardInfo = "$(CardInfo)
  404.                     ForListDo $(CardInfo)
  405.                        Debug-Output "Current CardInfo Entry = "$($)
  406.                        set TmpBusNumber = *($($), 1)
  407.                        set SlotNumber = *($($), 2)
  408.                        set MCAPosId = *($($), 3)
  409.                        Debug-Output "Calling DoesControllerExist:"
  410.                        Debug-Output "    AdapterHardwareName = "$(AdapterHardwareName)
  411.                        Debug-Output "    BusNumber = "$(TmpBusNumber)
  412.                        Debug-Output "    Slot # = "$(SlotNumber)
  413.                        Debug-Output " DIGIHANDLE = "$(DIGIHANDLE)
  414.                        LibraryProcedure Result, $(DIGIHANDLE), +
  415.                        DoesControllerExist, $(AdapterHardwareName), +
  416.                                     $(TmpBusNumber),        +
  417.                                     $(SlotNumber)
  418.                        Debug-Output "DoesControllerExist return: "$(Result)
  419.                        ifstr(i) $(Result) == "FALSE"
  420.                       set AlternateIO = {Slot$(SlotNumber)}
  421.                       Debug-Output "Setting AlternateIO: "$(AlternateIO)
  422.                       set AlternateMemory = {Slot$(SlotNumber)}
  423.                       Debug-Output "Setting AlternateMemory: "$(AlternateMemory)
  424.                       set AlternateIRQ = {Slot$(SlotNumber)}
  425.                       Debug-Output "Setting AlternateIRQ: "$(AlternateIRQ)
  426.                       set BusTypeNum = 3
  427.                       goto continueSetup1
  428.                        endif
  429.                     EndForListDo
  430.                 endif
  431.             EndForListDo
  432.             goto cancel
  433.         endif
  434.     endif
  435. continueSetup1 = +
  436.     LibraryProcedure Result, $(DIGIHANDLE), +
  437.     DigiEntry, $(!STF_HWND), +
  438.            $(Option), +
  439.            $(!NTN_InstallMode), +
  440.            $(!NTN_RegBase), +
  441.            $(BusTypeNum), +
  442.            $(AlternateMemory), +
  443.            $(AlternateIO), +
  444.            $(AlternateIRQ)
  445.     Debug-Output "OEMNADDI.INF: Dialog Result is "$(Result)
  446.     Ifstr(i) $(Result) == Success
  447.         read-syms InvokeRasDlg$(!STF_LANGUAGE)
  448.         Ifstr(i) $(!NTN_InstallMode) == configure
  449.             goto skipRAS
  450.         else-ifstr(i) $(!NTN_InstallPhase) == primary
  451.             Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  452.               $(InvokeUserInstallRasMsg)
  453.             goto skipRAS
  454.         endif
  455.         Shell "oemnsvra.inf" CheckRasInstalled
  456.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  457.             Debug-Output "OEMNADDI.INF: Error Shelling the RAS INF file oemnsvra.inf"
  458.             Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE),  +
  459.               "STATUS", $(InvokeRasError)
  460.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  461.             goto ShellCodeError
  462.             endif
  463.             goto successful
  464.         endif
  465.         set RasInstalled = $($R0)
  466.         Debug-Output "OEMNADDI.INF: Is RAS Installed? "$(RasInstalled)
  467.         ifstr(i) $(RasInstalled) == FALSE
  468.             Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  469.               $(InvokeRasSetupMsg)
  470.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  471.             goto successful
  472.             endif
  473.         else
  474.             Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  475.               $(InvokeRasConfigMsg)
  476.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  477.             goto successful
  478.             endif
  479.         endif
  480.         Ifstr(i) $(!STF_IDW) == TRUE
  481.             set AddCopy  = NO
  482.             set DoCopy   = NO
  483.             set DoConfig = NO
  484.         else
  485.             set AddCopy  = YES
  486.             set DoCopy   = YES
  487.             set DoConfig = YES
  488.         endif
  489.         Debug-Output "OEMNADDI.INF: before - NTN_InstallMode = "$(!NTN_InstallMode)
  490.         set SaveNTN_InstallMode = $(!NTN_InstallMode)
  491.         ifstr(i) $(RasInstalled) == TRUE
  492.              set !NTN_InstallMode = configure
  493.         else
  494.             set !NTN_InstallMode = install
  495.         endif
  496.         Debug-Output "OEMNADDI.INF: after - NTN_InstallMode = "$(!NTN_InstallMode)
  497.         set SaveSTF_SRCDIR_OVERRIDE = $(!STF_SRCDIR_OVERRIDE)
  498.         set !STF_SRCDIR_OVERRIDE = ""
  499.         Debug-Output "OEMNADDI.INF: Shelling to oemnsvra.inf InstallOption with parameters:"
  500.         Debug-Output "                  STF_LANGUAGE = "$(!STF_LANGUAGE)
  501.         Debug-Output "                  SrcDir = "$(SrcDir)
  502.         Debug-Output "                  AddCopy = "$(AddCopy)
  503.         Debug-Output "                  DoCopy = "$(DoCopy)
  504.         Debug-Output "                  DoConfig = "$(DoConfig)
  505.         Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  506.         set !NTN_InstallMode = $(SaveNTN_InstallMode)
  507.         set !STF_SRCDIR_OVERRIDE = $(SaveSTF_SRCDIR_OVERRIDE)
  508.         ifstr(i) $(!NTN_InstallMode) == "install"
  509.             set iSearch = 1
  510.         nextnci = +
  511.             Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  512.             set KeyNetcard = $($R0)
  513.             set iSearch = $($R1)
  514.             Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  515.             Ifstr $(KeyNetcard) != $(KeyNull)
  516.                 Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  517.                 SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  518.                 CloseRegKey $(KeyNetcard)
  519.                 goto nextnci
  520.             Endif
  521.         endif
  522.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  523.             Debug-Output "OEMNADDI.INF: Error Shelling the RAS INF file oemnsvra.inf"
  524.             Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS",  +
  525.               $(InvokeRasError)
  526.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  527.             goto ShellCodeError
  528.             endif
  529.             goto successful
  530.         Endif
  531. skipRAS = +
  532.         goto successful
  533.     else-Ifstr(i) $(Result) == Cancel
  534.         goto cancel
  535.     else-Ifstr(i) $(Result) == Error
  536.         goto fatal
  537. bindingadapter =+
  538.     set Error = "Binding: Sorry, not yet implemented."
  539.     goto fatal
  540. removeadapter = +
  541.     Debug-Output "OEMNADDI.INF: RegBase "$(!NTN_RegBase)
  542.     LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
  543.     Debug-Output "OEMNADDI.INF: LIBHANDLE is "$(!LIBHANDLE)
  544.     LoadLibrary "x" $(!STF_CWDDIR)digiinst.dll DIGIHANDLE
  545.     Debug-Output "OEMNADDI.INF: DIGIHANDLE is "$(DIGIHANDLE)
  546.     LibraryProcedure Result, $(DIGIHANDLE), DigiEntry, $(!STF_HWND) $(Option) $(!NTN_InstallMode) $(!NTN_RegBase) $(BusTypeNum)
  547.     goto end
  548. UpgradeSoftware = +
  549.     Debug-Output "OEMNADDI:   ****   Entering UpgradeSoftware   ****"
  550.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  551.     Ifstr $(KeyProduct) != $(KeyNull)
  552.         CloseRegKey $(KeyProduct)
  553.         set NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  554.         OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardKeyName) $(!MAXIMUM_ALLOWED) IE_KeyNetcards
  555.         ifstr(i) $(IE_KeyNetcards) != ""
  556.             Debug-Output "OEMNADDI:  Enumerating all NetworkCard keys"
  557.             EnumRegKey $(IE_KeyNetcards) IE_KeyNameList
  558.             ForListDo $(IE_KeyNameList)
  559.                 set Detected31 = FALSE
  560.                 OpenRegKey $(IE_KeyNetcards) "" *($($),1) +
  561.                       $(!MAXIMUM_ALLOWED) NetworkCardKey
  562.                 Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  563.                     GetRegValue $(NetworkCardKey),"Manufacturer", ManufacturerInfo
  564.                     set ManufacturerName = *($(ManufacturerInfo), 4)
  565.                     Debug-Output "   Manufacturer = "$(ManufacturerName)
  566.                     Ifstr $(ManufacturerName) != $(Manufacturer)
  567.                     goto nextnetcard
  568.                     endif
  569.                     GetRegValue $(NetworkCardKey),"ProductName", ProductNameInfo
  570.                     set ProductName = *($(ProductNameInfo), 4)
  571.                     Debug-Output "   ProductName = "$(ProductName)
  572.                     Ifstr(i) $(ProductName) != "PCIMAC"
  573.                     goto nextnetcard
  574.                     endif
  575.                     GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  576.                     set ServiceName = *($(ServiceNameInfo), 4)
  577.                     Debug-Output "   ServiceName = "$(ServiceName)
  578.                     OpenRegKey $(NetworkCardKey) "" "NetRules" +
  579.                     $(!MAXIMUM_ALLOWED) NetRuleKey
  580.                     Ifstr $(NetRuleKey) != $(KeyNull)
  581.                        GetRegValue $(NetRuleKey),"InfOption", InfOptionInfo
  582.                        set InfOption = *($(InfOptionInfo), 4)
  583.                        Debug-Output "   InfOption = "$(InfOption)
  584.                        Ifstr(i) $(InfOption) == "PCIMAC/4"
  585.                           Debug-Output "Resetting InfOption to PCIMAC4"
  586.                           SetRegValue $(NetRuleKey) {InfOption,$(NoTitle),$(!REG_VT_SZ),"PCIMAC4"}
  587.                           set InfOption = "PCIMAC4"
  588.                        Else-Ifstr(i) $(InfOption) == "PCIMAC"
  589.                        Debug-Output "OEMNADDI: Updating config which started as NT 3.1"
  590.                        OpenRegKey $(!REG_H_LOCAL) "" +
  591.                          $(!NTN_ServiceBase)"\"$(ServiceName) +
  592.                          $(!MAXIMUM_ALLOWED) ServiceKey
  593.                        Ifstr $(ServiceKey) != $(KeyNull)
  594.                            Debug-Output "   Opened service key "$(ServiceName)" successfully"
  595.                            OpenRegKey $(ServiceKey) "" "Parameters" +
  596.                              $(!MAXIMUM_ALLOWED) ParametersKey
  597.                            Ifstr $(ParametersKey) != $(KeyNull)
  598.                             set RegLastError = $(!REG_ERROR_SUCCESS)
  599.                             GetRegValue $(ParametersKey),"BoardLink", BoardLinkInfo
  600.                             set BoardLink = *($(BoardLinkInfo), 4)
  601.                             Debug-Output "OEMNADDI: BoardLink = "$(BoardLink)
  602.                             Debug-Output "OEMNADDI: RegLastError = "$(RegLastError)
  603.                             ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  604.                             Debug-Output "OEMNADDI:  Detected NT 3.1 configuration"
  605.                             OpenRegKey $(!REG_H_LOCAL) +
  606.                                    "" +
  607.                                    $(ParamKeyName) +
  608.                                    $(!MAXIMUM_ALLOWED) +
  609.                                    DriverKey
  610.                             Ifstr(i) $(DriverKey) != $(KeyNull)
  611.                                 Debug-Output "OEMNADDI.INF:  Opened "$(ParamKeyName)
  612.                                 OpenRegKey $(DriverKey) +
  613.                                        "" +
  614.                                        $(BoardLink) +
  615.                                        $(!MAXIMUM_ALLOWED) +
  616.                                        AdapterKey
  617.                                 Ifstr(i) $(AdapterKey) != $(KeyNull)
  618.                                             Debug-Output "OEMNADDI:  Opened "$(ParamKeyName)"\"$(BoardLink)
  619.                                 GetRegValue $(AdapterKey), +
  620.                                         "Type", +
  621.                                         TypeInfo
  622.                                 set Type = *($(TypeInfo), 4 )
  623.                                             Debug-Output "OEMNADDI:  Type = "$(Type)
  624.                                 Ifstr(i) $(Type) == "PCIMAC/4"
  625.                                                 Debug-Output "OEMNADDI: Resetting InfOption to PCIMAC4"
  626.                                                 SetRegValue $(NetRuleKey) {InfOption,$(NoTitle),$(!REG_VT_SZ),"PCIMAC4"}
  627.                                     set InfOption = "PCIMAC4"
  628.                                             Debug-Output "OEMNADDI: Resetting Type to PCIMAC4"
  629.                                     SetRegValue $(AdapterKey) +
  630.                                         {Type,$(NoTitle),$(!REG_VT_SZ),"PCIMAC4"}
  631.                                 Else-Ifstr(i) $(Type) == "PCIMAC4"
  632.                                                 Debug-Output "OEMNADDI: Resetting InfOption to PCIMAC4"
  633.                                                 SetRegValue $(NetRuleKey) {InfOption,$(NoTitle),$(!REG_VT_SZ),"PCIMAC4"}
  634.                                     set InfOption = "PCIMAC4"
  635.                                 Else-Ifstr(i) $(Type) == "PCIMAC - ISA"
  636.                                     set InfOption = "PCIMACISA"
  637.                                                 Debug-Output "Resetting InfOption to PCIMACISA"
  638.                                                 SetRegValue $(NetRuleKey) {InfOption,$(NoTitle),$(!REG_VT_SZ),"PCIMACISA"}
  639.                                 Endif
  640.                                 Else
  641.                                 goto fatalregistry
  642.                                 Endif
  643.                                 CloseRegKey $(AdapterKey)
  644.                             Else
  645.                                 goto fatalregistry
  646.                             Endif
  647.                             CloseRegKey $(DriverKey)
  648.                             else
  649.                             Debug-Output "OEMNADDI: Detected NT 3.5 config which was upgraded from NT 3.1"
  650.                             GetRegValue $(ParametersKey) +
  651.                                     "BoardType" +
  652.                                     BoardTypeInfo
  653.                             set BoardType = *($(BoardTypeInfo), 4)
  654.                             Ifstr(i) $(BoardType) == "PCIMAC/4"
  655.                                 Debug-Output "OEMNADDI: Resetting InfOption to PCIMAC4"
  656.                                 SetRegValue $(NetRuleKey) {InfOption,$(NoTitle),$(!REG_VT_SZ),"PCIMAC4"}
  657.                                 set InfOption = "PCIMAC4"
  658.                                 Debug-Output "OEMNADDI: Changing BoardType from "$(BoardType)" -> PCIMAC4"
  659.                                 SetRegValue $(ParametersKey) +
  660.                                     {BoardType,$(NoTitle),$(!REG_VT_SZ),"PCIMAC4"}
  661.                             Else-Ifstr(i) $(BoardType) == "PCIMAC - ISA"
  662.                                 Debug-Output "Resetting InfOption to PCIMACISA"
  663.                                 SetRegValue $(NetRuleKey) {InfOption,$(NoTitle),$(!REG_VT_SZ),"PCIMACISA"}
  664.                                 set InfOption = "PCIMACISA"
  665.                             Endif
  666.                             endif
  667.                             CloseRegKey $(ParametersKey)
  668.                            else
  669.                            goto fatalregistry
  670.                            Endif
  671.                            CloseRegKey $(ServiceKey)
  672.                        else
  673.                            goto fatalregistry
  674.                        endif
  675.                        Endif
  676.                        set Option = $(InfOption)
  677.                        install "Install-Update"
  678.                        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  679.                      Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  680.                      goto filecopycancel
  681.                        endif
  682.                     endif
  683.                     CloseRegKey $(NetRules)
  684.                     CloseRegKey $(NetworkCardKey)
  685.                 endif
  686.                 OpenRegKey $(!REG_H_LOCAL) "" +
  687.                       $(!NTN_ServiceBase)"\"$(ServiceName) +
  688.                       $(!MAXIMUM_ALLOWED) ServiceKey
  689.                 Ifstr $(ServiceKey) != $(KeyNull)
  690.                     Debug-Output "   Opened service key "$(ServiceName)" successfully"
  691.                     OpenRegKey $(ServiceKey) "" "Parameters" +
  692.                       $(!MAXIMUM_ALLOWED) ParametersKey
  693.                     Ifstr $(ParametersKey) != $(KeyNull)
  694.                        Ifstr(i) $(InfOption) == "PCIMAC4"
  695.                     Debug-Output "Resetting BoardType = PCIMAC4"
  696.                     SetRegValue $(ParametersKey) {BoardType,$(NoTitle),$(!REG_VT_SZ),"PCIMAC4"}
  697.                        Endif
  698.                        CloseRegKey $(ParametersKey)
  699.                     else
  700.                     goto fatalregistry
  701.                     Endif
  702.                     CloseRegKey $(ServiceKey)
  703.                 else
  704.                     goto fatalregistry
  705.                 endif
  706. nextnetcard = +
  707.             EndForListDo
  708.         endif
  709.        shell "" QueryParameters $(!NTN_RegBase)
  710.        set BusTypeNum = $($R1)
  711.        Debug-Output "OEMNADDI.INF: (update) BusTypeNum is: "$(BusTypeNum)
  712.         LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
  713.         LoadLibrary "x" $(!STF_CWDDIR)digiinst.dll DIGIHANDLE
  714.         LibraryProcedure Result, $(DIGIHANDLE), DigiEntry, $(!STF_HWND) $(Option) $(!NTN_InstallMode) "" $(BusTypeNum)
  715.         Ifstr(i) $(Result) == Success
  716.             goto successful
  717.         else-Ifstr(i) $(Result) == Cancel
  718.             goto cancel
  719.         else-Ifstr(i) $(Result) == Error
  720.             goto fatal
  721.         endif
  722.         FreeLibrary $(!LIBHANDLE)
  723.         FreeLibrary $(DIGIHANDLE)
  724.     endif
  725.     set iSearch = 1
  726. nextncu = +
  727.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  728.     set KeyNetcard = $($R0)
  729.     set iSearch = $($R1)
  730.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  731.     Ifstr $(KeyNetcard) != $(KeyNull)
  732.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  733.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  734.         CloseRegKey $(KeyNetcard)
  735.         goto nextncu
  736.     Endif
  737.     goto end
  738. successful = +
  739.     set CommonStatus = STATUS_SUCCESSFUL
  740.     goto end
  741. warning = +
  742.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  743.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  744.         goto ShellCodeError
  745.     endif
  746.     ifstr(i) $($R1) == "OK"
  747.         goto $(to)
  748.     else-ifstr(i) $($R1) == "CANCEL"
  749.         goto $(from)
  750.     else
  751.         goto "end"
  752.     endif
  753. nonfatalinfo = +
  754.     Set Severity = STATUS
  755.     Set CommonStatus = STATUS_USERCANCEL
  756.     goto nonfatalmsg
  757. nonfatal = +
  758.     Set Severity = NONFATAL
  759.     goto nonfatalmsg
  760. nonfatalmsg = +
  761.     ifstr(i) $(Error) == ""
  762.         Set Severity = NONFATAL
  763.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  764.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  765.             goto ShellCodeError
  766.         endif
  767.         set Error = $($R0)
  768.     endif
  769.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  770.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  771.         goto ShellCodeError
  772.     endif
  773.     ifstr(i) $($R1) == "OK"
  774.         goto $(from)
  775.     else
  776.         goto "end"
  777.     endif
  778. fatalregistry = +
  779.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  780.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  781.         goto ShellCodeError
  782.     endif
  783.     set Error = $($R0)
  784.     goto nonfatal
  785. fataldetect = +
  786.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  787.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  788.         Debug-Output "ShellCode error: cannot get an error string."
  789.         goto ShellCodeError
  790.     endif
  791.     set Error = $($R0)
  792.     Goto fatal
  793. fatal = +
  794.     ifstr(i) $(Error) == ""
  795.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  796.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  797.             goto ShellCodeError
  798.         endif
  799.         set Error = $($R0)
  800.     endif
  801.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  802.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  803.         goto ShellCodeError
  804.     endif
  805.     goto setfailed
  806. ShellCodeError = +
  807.     set DlgType      = "MessageBox"
  808.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  809.     set STF_MB_TEXT  = "Shell Code Error"
  810.     set STF_MB_TYPE  = 1
  811.     set STF_MB_ICON  = 3
  812.     set STF_MB_DEF   = 1
  813.     ui start "Error Message"
  814.     goto setfailed
  815. setfailed = +
  816.     set CommonStatus = STATUS_FAILED
  817.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  818.         set OEM_ABANDON_ON = FALSE
  819.         goto end
  820.     endif
  821.     goto end
  822. filecopycancel = +
  823.     set CommonStatus = STATUS_NO_EFFECT
  824.     goto end
  825. cancel = +
  826.     set CommonStatus = STATUS_USERCANCEL
  827.     goto term
  828. end = +
  829.     goto term
  830. term = +
  831.     Return $(CommonStatus)
  832.     exit
  833. [DebugConfiguration]
  834.     Set InfName = "OEMNADDI.INF"
  835.     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  836.     return
  837. [Install-Option]
  838.     set STF_VITAL = NO
  839.     ifstr(i) $(AddCopy) == "YES"
  840.         ifint $(CopyFirmwareOnly) == $(FALSE)
  841.             AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  842.             AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  843.         endif
  844.         LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(SrcDir)..\common\isdnhelp.hlp
  845.         ifstr(i) $(FilePresent) != "YES"
  846.             LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(SrcDir)..\common\isdnhelp.hl_
  847.             ifstr(i) $(FilePresent) != "YES"
  848.                 Debug-Output "Retrieving images from "$(SrcDir)
  849.                 AddSectionFilesToCopyList Files-$(Option)-firmware $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  850.                 ifint $(CopyFirmwareOnly) == $(FALSE)
  851.                     AddSectionFilesToCopyList Files-common-system32 $(SrcDir) $(!STF_WINDOWSSYSPATH)
  852.                 endif
  853.             else
  854.                 Debug-Output "Retrieving images from "$(SrcDir)"..\common"
  855.                 AddSectionFilesToCopyList Files-$(Option)-firmware $(SrcDir)..\common $(!STF_WINDOWSSYSPATH)\drivers
  856.                 ifint $(CopyFirmwareOnly) == $(FALSE)
  857.                     AddSectionFilesToCopyList Files-common-system32 $(SrcDir)..\common $(!STF_WINDOWSSYSPATH)
  858.                 endif
  859.             endif
  860.         else
  861.             Debug-Output "Retrieving images from "$(SrcDir)"..\common"
  862.             AddSectionFilesToCopyList Files-$(Option)-firmware $(SrcDir)..\common $(!STF_WINDOWSSYSPATH)\drivers
  863.             ifint $(CopyFirmwareOnly) == $(FALSE)
  864.                 AddSectionFilesToCopyList Files-common-system32 $(SrcDir)..\common $(!STF_WINDOWSSYSPATH)
  865.             endif
  866.         endif
  867.     endif
  868.     ifstr(i) $(DoCopy) == "YES"
  869.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  870.        CopyFilesInCopyList
  871.     else
  872.        LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(SrcDir)..\common\isdnhelp.hlp
  873.        ifstr(i) $(FilePresent) != "YES"
  874.           LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(SrcDir)..\common\isdnhelp.hl_
  875.           ifstr(i) $(FilePresent) != "YES"
  876.              LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\DIGIINST.DLL $(!STF_WINDOWSSYSPATH)\DIGIINST.DLL
  877.              LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\ISDNHELP.CNT $(!STF_WINDOWSSYSPATH)\ISDNHELP.CNT
  878.              LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\ISDNHELP.HLP $(!STF_WINDOWSSYSPATH)\ISDNHELP.HLP
  879.           else
  880.              LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\DIGIINST.DLL $(!STF_WINDOWSSYSPATH)\DIGIINST.DLL
  881.              LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\..\common\ISDNHELP.HLP $(!STF_WINDOWSSYSPATH)\ISDNHELP.HLP
  882.           endif
  883.        else
  884.           LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\DIGIINST.DLL $(!STF_WINDOWSSYSPATH)\DIGIINST.DLL
  885.           LibraryProcedure STATUS,$(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\..\common\ISDNHELP.HLP $(!STF_WINDOWSSYSPATH)\ISDNHELP.HLP
  886.        endif
  887.     endif
  888.     Exit
  889. [Install-Update]
  890.     Debug-Output "********************* Inside Install-Update *************************"
  891.     Debug-Output "   AddCopy = "$(AddCopy)
  892.     Debug-Output "   DoCopy = "$(DoCopy)
  893.     Debug-Output "   DoConfig = "$(DoConfig)
  894.     Debug-Output "   NTN_InstallPhase = "$(!NTN_InstallPhase)
  895.     Debug-Output "   Option = "$(Option)
  896.     Debug-Output "   SrcDir = "$(SrcDir)
  897.    set STF_VITAL        = NO
  898.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  899.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  900.    AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  901.    LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(SrcDir)..\common\isdnhelp.hlp
  902.    ifstr(i) $(FilePresent) != "YES"
  903.        LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(SrcDir)..\common\isdnhelp.hl_
  904.        ifstr(i) $(FilePresent) != "YES"
  905.            Debug-Output "   Retrieving images from "$(SrcDir)
  906.            AddSectionFilesToCopyList Files-$(Option)-firmware $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  907.            AddSectionFilesToCopyList Files-common-system32 $(SrcDir) $(!STF_WINDOWSSYSPATH)
  908.        else
  909.            Debug-Output "   Retrieving images from "$(SrcDir)"..\common"
  910.            AddSectionFilesToCopyList Files-$(Option)-firmware $(SrcDir)..\common $(!STF_WINDOWSSYSPATH)\drivers
  911.            AddSectionFilesToCopyList Files-common-system32 $(SrcDir)..\common $(!STF_WINDOWSSYSPATH)
  912.        endif
  913.    else
  914.        Debug-Output "   Retrieving images from "$(SrcDir)"..\common"
  915.        AddSectionFilesToCopyList Files-$(Option)-firmware $(SrcDir)..\common $(!STF_WINDOWSSYSPATH)\drivers
  916.        AddSectionFilesToCopyList Files-common-system32 $(SrcDir)..\common $(!STF_WINDOWSSYSPATH)
  917.    endif
  918.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  919.    CopyFilesInCopyList
  920.    Debug-Output "********************* exiting Install-Update *************************"
  921.    exit
  922. [QueryParameters]
  923.    set Status = STATUS_FAILED
  924.    set KeyProduct      = ""
  925.    set KeyNull         = ""
  926.    set KeyProductName = $($0)
  927.    set BusTypeNum = 1
  928.    Debug-Output "QueryParameters: "$(KeyProductName)
  929.    Debug-Output "                 REG_H_LOCAL = "$(!REG_H_LOCAL)
  930.    Debug-Output "                 !MAXIMUM_ALLOWED = "$(!MAXIMUM_ALLOWED)
  931.    Debug-Output "                 UtilityInf = "$(UtilityInf)
  932.    Debug-Output "                 UtilityInf = "$(UtilityInf)
  933.    OpenRegKey $(!REG_H_LOCAL) "" $(KeyProductName) $(!MAXIMUM_ALLOWED) KeyProduct
  934.    Debug-Output "KeyProduct = "$(KeyProduct)
  935.    Ifstr $(KeyProduct) == $(KeyNull)
  936.        set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  937.        Debug-Output "Cannot find component product key"
  938.        goto QueryParameters_End
  939.    Endif
  940.    Debug-Output "INF: Shelling to FindService"
  941.    Shell $(UtilityInf) FindService, $(KeyProduct)
  942.    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  943.        Debug-Output "INF: FindService shell failure"
  944.        Goto QueryParameters_End
  945.    Endif
  946.    Ifstr(i) $($R0) != NO_ERROR
  947.        Debug-Output "INF: FindService Shell error: "$($R0)
  948.        Goto QueryParameters_End
  949.    endif
  950.    set KeyParameters = $($R2)
  951.    CloseRegKey $($R1)
  952.    Ifstr $(KeyParameters) == $(KeyNull)
  953.        set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  954.        Debug-Output "Cannot find component service"
  955.        Goto QueryParameters_End
  956.    endif
  957.    set ValueName = ""
  958.    set ValueData = ""
  959.    set ValueStr  = ""
  960.    set ValueList = {}
  961.    EnumRegValue $(KeyParameters) ValueList
  962.    ForListDo $(ValueList)
  963.        set ValueItem = $($)
  964.        set ValueName = *($(ValueItem),1)
  965.        set ValueData = *($(ValueItem),4)
  966.        Ifstr(i) $(ValueName) == "BusType"
  967.            set BusTypeNum = $(ValueData)
  968.        endif
  969.    EndForListDo
  970.    set Status = STATUS_SUCCESSFUL
  971. QueryParameters_End = +
  972.    Return $(Status) $(BusTypeNum)
  973. [Source Media Descriptions]
  974.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  975. [Signature]
  976.     FileType = MICROSOFT_FILE
  977. [GetSignature]
  978.     read-syms Signature
  979.     return $(FileType)
  980. [ProductType]
  981. STF_PRODUCT  = LanmanNT
  982. STF_PLATFORM = I386
  983. [Files-Inf]
  984. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  985. [Files-common-system32]
  986. 1,ISDNHELP.CNT , SIZE=999
  987. 1,ISDNHELP.HLP , SIZE=999
  988. [Files-DATAFIRE4ST-firmware]
  989. 1,ADP.BIN , SIZE=999
  990. [Files-DATAFIRE4ST]
  991. 1,PCIMAC.SYS , SIZE=999
  992. [Files-DATAFIREST-firmware]
  993. 1,ADP.BIN , SIZE=999
  994. [Files-DATAFIREST]
  995. 1,PCIMAC.SYS , SIZE=999
  996. [Files-DATAFIREU-firmware]
  997. 1,ADP.BIN , SIZE=999
  998. [Files-DATAFIREU]
  999. 1,PCIMAC.SYS , SIZE=999
  1000. [Files-Dll]
  1001. 1,DIGIINST.DLL , SIZE=999
  1002. [Files-PCIMAC4-firmware]
  1003. 1,IDP_XFS.BIN , SIZE=999
  1004. [Files-PCIMAC4]
  1005. 1,PCIMAC.SYS , SIZE=999
  1006. [Files-PCIMACISA-firmware]
  1007. 1,IDP_XFS.BIN , SIZE=999
  1008. [Files-PCIMACISA]
  1009. 1,PCIMAC.SYS , SIZE=999
  1010. [Files-PCIMACMC-firmware]
  1011. 1,IDP_XFS.BIN , SIZE=999
  1012. [Files-PCIMACMC]
  1013. 1,PCIMAC.SYS , SIZE=999
  1014. [OptionsTextENG]
  1015.     DATAFIREU     = "Digi DataFire - ISA1U Adapter"
  1016.     DATAFIREST    = "Digi DataFire - ISA1S/T Adapter"
  1017.     DATAFIRE4ST   = "Digi DataFire - ISA4S/T Adapter"
  1018.     PCIMACISA     = "Digi PCIMAC - ISA Adapter"
  1019.     PCIMAC4       = "Digi PCIMAC/4 Adapter"
  1020. [OptionsTextMCAENG]
  1021.     PCIMACMC      = "Digi PCIMAC - MC Adapter"
  1022. [FileConstantsENG]
  1023. ProCaption   = "Windows NT Setup"
  1024. ProCancel    = "Cancel"
  1025. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  1026.                "Are you sure you want to cancel copying files?"
  1027. ProCancelCap = "Network Setup Message"
  1028. ProText1     = "Copying:"
  1029. ProText2     = "To:"
  1030. FunctionTitle   = "Digi ISDN Adapter Card Setup"
  1031. ProductSoftwareDescription      = "Digi ISDN Adapter Driver"
  1032. ProductHardwarePCIMACDescription        = "Digi ISDN Adapter"
  1033. [InvokeRasDlgENG]
  1034. InvokeRasSetupMsg = "Digi ISDN setup is complete. "+
  1035.                     "Remote Access Services (RAS) will now be installed. "+
  1036.                     "Please configure one or more ISDN ports in RAS setup "+
  1037.                     "to enable you to use RAS over ISDN."
  1038. InvokeRasConfigMsg = "Digi ISDN setup is complete. "+
  1039.                      "Remote Access Services (RAS) setup will now be invoked. "+
  1040.                      "Please configure one or more ISDN ports in RAS setup "+
  1041.                      "to enable you to use RAS over ISDN."
  1042. InvokeRasError =  "Digi ISDN setup encountered an error while invoking "+
  1043.                   "the RAS setup INF file (OEMNSVRA.INF). "+
  1044.                   "Please make sure that the file is present in the system32 "+
  1045.                   "directory and is the proper file."
  1046. InvokeUserInstallRasMsg = "Digi ISDN setup is complete. "+
  1047.                     "Remote Access Services (RAS) should be installed and "+
  1048.                     "one or more ISDN ports configured in RAS setup. "
  1049.